<template>
  <div class="leftLeft">
    <el-container style="overflow-x:hidden;height: 100vh">
      <el-aside width="5.2%" style="height: 100vh">
        <div>
          <img alt="Vue logo" src="@/assets/logo.png" style="border-radius: 50%;width: 60%;margin-left: 15%;margin-top: 30%" @click="gotoSelf">
        </div>
        <el-menu
          :default-active="this.$store.state.leftLeft"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#6D7190"
          text-color="#fff"
          active-text-color="#ffd04b"
          collapse=collapse
        >
          <el-menu-item index="1" style="margin-top: 100%" @click="myTask()">
            <i class="el-icon-s-cooperation" style="font-size: 200%"></i>
            <span slot="title">我的项目</span>
          </el-menu-item>

          <el-menu-item index="2" style="margin-top: 100%" @click="myTeam()">
            <i class="el-icon-s-custom" style="font-size: 200%"></i>
            <span slot="title">我的团队</span>
          </el-menu-item>

          <el-menu-item index="3" style="margin-top: 100%" @click="teamUpload()">
            <i class="el-icon-share" style="font-size: 200%"></i>
            <span slot="title">团队动态</span>
          </el-menu-item>
        </el-menu>
        <el-popover
          placement="right"
          width="400"
          trigger="click">
          <el-table :data="gridData">
            <el-table-column width="150" property="date" label="日期"></el-table-column>
            <el-table-column width="100" property="name" label="姓名"></el-table-column>
            <el-table-column width="300" property="address" label="地址"></el-table-column>
          </el-table>//可以任意更改为想要的内容，此处的表格仅为演示
          <el-button slot="reference" class="el-icon-message-solid" style="background: #6D7190;font-size: 200%;margin-top: 350%;margin-left: -7.9%;color: white" ></el-button>
        </el-popover>
      </el-aside>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'leftLeft',
  data() {
    return {
      isCollapse: true
    };
  },
  created() {

  },
  methods:{
    gotoSelf(){
      console.log('go')
    },
    myTask(){
      this.$store.state.leftLeft='1'
      this.$router.replace('/program/show')
    },
    myTeam(){
      this.$store.state.leftLeft='2'
      this.$router.replace('/team/member')
    },
    teamUpload(){
      this.$store.state.leftLeft='3'
      this.$router.replace('/msg/show')
    },
    handleOpen(key, keyPath) {

    },
    handleClose(key, keyPath) {

    }
  }
}
</script>

<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
html,body,#app,.el-container,.leftLeft /deep/{
  padding: 0px;
  margin: 0px;
  height: 100vh!important;
}

.el-aside{
  background-color: #6D7190;
  height: 100vh;
}
.el-menu,.el-button {
  border-right:0!important;
  border-left:0!important;
  border-top:0!important;
  border-bottom:0!important;
}
</style>
